<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>$apply进行数据脏检查</title>
		<script src="../org/angular.min.js"></script>
		<script type="text/javascript" src="../org/jquery.min.js" ></script>
	</head>
	<body>
		<div ng-app="hd" ng-controller="ctrl">
			{{name}}
			<button id="btn" ng-click="change()">点击</button>
			<hr />
			<button id="btn">点击</button>
		</div>
		<script>
			var m = angular.module('hd',[]);
			m.controller('ctrl',['$scope',function($scope){
				$scope.name = "renren";
//				$scope.change = function(){
//					$scope.name = '人人';
//				}
                $('#btn').click(function(){
                	$scope.name = '人人';
                	$scope.$apply();
                })
			}])
		</script>
	</body>
</html>
